<div data-ui-view>
<div class="alert alert-error" ng-show="error">{{errorMessage}}</div>
<div class="bg-light lter b-b wrapper-md">
  <h1 class="m-n font-thin h3">流程定义</h1>
</div>
<div class="wrapper-md" >
	<div class="panel panel-default">
	
    <div class="row wrapper" >
    	<div class="col-sm-4">
    		<a class="btn m-b-xs btn-sm btn-primary btn-addon" ui-sref="app.ProcessDef.add({fold:'unread'})"><i class="fa fa-plus"></i> 部署</a>
			<button class="btn m-b-xs btn-sm btn-danger btn-addon"><i class="fa fa-trash-o"></i>Info</button>
      </div>
      <div class="col-sm-5 m-b-xs">
           
      </div>
      
      <div class="col-sm-3">
        <div class="input-group">
          <input type="text" class="input-sm form-control" placeholder="Search" ng-model="query">
          <span class="input-group-btn">
            <button class="btn btn-sm btn-default" type="button">搜索</button>
          </span>
        </div>
      </div>
    </div>
    <div class="table-responsive">
      <table class="table table-striped b-t b-light" ng-controller="TaskController">
        <thead>
          <tr>
            <th style="width:20px;">
              <label class="i-checks m-b-none">
                <input type="checkbox" ng-model="selectAll" ><i></i>
              </label>
            </th>
            <th>任务ID</th>
            <th>任务名称</th>
            <th>流程实例ID</th>
            <th>任务办理时间</th>
            <th>办理人</th>
         
            <th style="width:30px;"></th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="data in datas | filter:query">
            <td><label class="i-checks m-b-none"><input ng-checked="selectAll" ng-model="x" type="checkbox" name="post[]" ng-click="chk(data.defId,x)"><i></i></label></td>
            <td>{{data.id}}</td>
            <td>{{data.name}}</td>
            <td>{{data.processInstanceId}}</td>
            <td>{{data.createTime}}</td>

            <td>{{data.assignee}}</td>
            <td ng-if="data.assignee">
			 
              <a class="btn btn-mini btn-danger" ui-sref="app.ProcessDef.process({taskId:data.id})">办理</a>

            </td>
            <td ng-if="!data.assignee">
			 
              <button class="btn btn-mini btn-danger" ng-click="claim({{data.id}})">签收</button>

            </td>
          </tr>
         
        </tbody>
      </table>
    </div>
    <footer class="panel-footer">
      <div class="row">
        <div class="col-sm-4 hidden-xs">
                       
        </div>
        <div class="col-sm-4 text-center">
          <small class="text-muted inline m-t-sm m-b-sm">showing 20-30 of 50 items</small>
        </div>
        <div class="col-sm-4 text-right text-center-xs">                
          <ul class="pagination pagination-sm m-t-none m-b-none">
            <li><a href><i class="fa fa-chevron-left"></i></a></li>
            <li><a href>1</a></li>
            <li><a href>2</a></li>
            <li><a href>3</a></li>
            <li><a href>4</a></li>
            <li><a href>5</a></li>
            <li><a href><i class="fa fa-chevron-right"></i></a></li>
          </ul>
        </div>
      </div>
    </footer>
  </div>
  
</div>
</div>